﻿#include "Heap.h"

int main()
{
	int arr[] = { 1,3,4,65,7,5,3,4,56,8,45,2,6,8 };
	sort(arr, sizeof(arr) / sizeof(arr[0]));
	for (size_t i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}


int main1()
{
	Tree* t = chushihua();
	push(t, 4);
	push(t, 2);
	push(t, 8);
	push(t, 1);
	push(t, 5);
	push(t, 6);
	push(t, 9);
	push(t, 7);

	while (!isEmpty(t)) {
		printf("%d ", top(t));
		pop(t);
	}

	xiaohui(t);
	t = NULL;
	return 0;
}